home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 March / EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso / earcd / program / ixemlsrc.lha / ixemul / general / crypt.c < prev    next >
C/C++ Source or Header  |  1995-12-23  |  2KB  |  69 lines

  1. /* Stubs for crypt functions which may be export restricted by stupid USA
  2.  * ITAR (International Trade in Arms Regulations).
  3.  *
  4.  * To compile a version of the library in the free world (IE outside the USA)
  5.  * simply replace this file with the real crypt.c, which should be widely
  6.  * available on ftp servers.
  7.  * 
  8.  */
  9.  
  10. #define KERNEL
  11. #include <ixemul.h>
  12. #include <unistd.h>
  13.  
  14. /*
  15.  * Return a pointer to static data consisting of the "setting"
  16.  * followed by an encryption produced by the "key" and "setting".
  17.  */
  18.  
  19. char *crypt (const char *key, const char *setting)
  20. {
  21.   ix_panic ("This version of ixemul.library does not support encryption/decryption.");
  22.   return NULL;
  23. }
  24.  
  25. /*
  26.  * Encrypt (or decrypt if num_iter < 0) the 8 chars at "in" with abs(num_iter)
  27.  * iterations of DES, using the the given 24-bit salt and the pre-computed key
  28.  * schedule, and store the resulting 8 chars at "out" (in == out is permitted).
  29.  *
  30.  * NOTE: the performance of this routine is critically dependent on your
  31.  * compiler and machine architecture.
  32.  */
  33.  
  34. int des_cipher (const char *in, char *out, long salt, int num_iter)
  35. {
  36.   ix_panic ("This version of ixemul.library does not support encryption/decryption.");
  37.   return 0;
  38. }
  39.  
  40. /*
  41.  * Set up the key schedule from the key.
  42.  */
  43.  
  44. int des_setkey (const char *key)
  45. {
  46.   ix_panic ("This version of ixemul.library does not support encryption/decryption.");
  47.   return 0;
  48. }
  49.  
  50. /*
  51.  * "encrypt" routine (for backwards compatibility)
  52.  */
  53.  
  54. int encrypt (char *block, int flag)
  55. {
  56.   ix_panic ("This version of ixemul.library does not support encryption/decryption.");
  57.   return 0;
  58. }
  59.  
  60. /*
  61.  * "setkey" routine (for backwards compatibility)
  62.  */
  63.  
  64. int setkey (const char *key)
  65. {
  66.   ix_panic ("This version of ixemul.library does not support encryption/decryption.");
  67.   return 0;
  68. }
  69.